home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat6 / mandel.z / mandel
Encoding:
Text File  |  2000-10-16  |  21.8 KB  |  463 lines

  1.  
  2.  
  3.  
  4. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mandel - display of Mandelbrot and Julia set images
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      mmmmaaaannnnddddeeeellll [-fjmopv] [-c <coord>] [-i max_iterations]
  13.      [-n num_local_processes] [fname]
  14.  
  15.      mmmmaaaannnnddddeeeellllzzzzoooooooommmm
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _M_a_n_d_e_l is a program for exploring the Mandelbrot set and displaying
  19.      Mandelbrot and Julia images.  The demo consists of two executables:
  20.      mmmmaaaannnnddddeeeellll and mmmmaaaannnnddddeeeellllzzzzoooooooommmm.  The mmmmaaaannnnddddeeeellll program does mandelbrot calculations
  21.      and also displays the resulting images.  By default, it does this on a
  22.      single host.  However, mmmmaaaannnnddddeeeellll is capable of connecting to remote hosts
  23.      which can contribute to the calculations.  For this to happen, the
  24.      mmmmaaaannnnddddeeeellllzzzzoooooooommmm program must exist on the desired remote host(s).  mmmmaaaannnnddddeeeellll can
  25.      then cause the remote mmmmaaaannnnddddeeeellllzzzzoooooooommmm programs to start executing, and it can
  26.      connect to them.
  27.  
  28.    RRRReeeessssoooouuuurrrrcccceeee FFFFiiiilllleeee
  29.      When mmmmaaaannnnddddeeeellll executes, it looks for a file named '.mandelrc,' first in the
  30.      current working directory and then in the home directory.  This file
  31.      contains a list of host names and directory names where mmmmaaaannnnddddeeeellllzzzzoooooooommmm can be
  32.      found, and also the values of some other options.  See the
  33.      mandelrc.sample file in the /usr/demos/General_Demos/mandel directory as
  34.      a sample.
  35.  
  36.      If no .mandelrc file exists, mmmmaaaannnnddddeeeellll simply creates one or more processes
  37.      on the local machine to do the calculations, and it connects to these
  38.      process using unix pipes.  The number of processes depends on the number
  39.      of cpus.
  40.  
  41.      Within the .mandelrc file you may specify initial values for some of the
  42.      options used by the mmmmaaaannnnddddeeeellll program. Allowable types of lines are as
  43.      follows:
  44.  
  45.      1111....   zoomdir:  dirname
  46.  
  47.           "dirname" is the directory name where mmmmaaaannnnddddeeeellllzzzzoooooooommmm resides.  The
  48.           default zoomdir is /usr/demos/General_Demos/mandel.
  49.  
  50.      2222....   logname: lname
  51.  
  52.           "lname" will be used as the default login name when making
  53.           connections to hosts.
  54.  
  55.      3333....   passwd: defpasswd
  56.  
  57.           This specifies the default passwd to be used with the default login
  58.           name.  Two quotes ("") denote an empty string.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  71.  
  72.  
  73.  
  74.           (Currently passwd is ignored.)
  75.  
  76.      4444....   remhosts: hostname [-l loginname] [-p passwd] [dirname]
  77.  
  78.           mmmmaaaannnnddddeeeellllzzzzoooooooommmm is expected to reside in "dirname" on the host
  79.           "hostname."  If a directory name is not specified, then zoomdir is
  80.           used.
  81.  
  82.      5555....   color dir: dirname
  83.  
  84.           "dirname" is the pathname of the directory containing mandel color
  85.           files.
  86.  
  87.      6666....   row delta: <n>
  88.  
  89.      7777....   rows per farmout: <n>
  90.  
  91.      8888....   interpolate data: "yes" or "no"
  92.  
  93.      9999....   sparse rows: "yes" or "no" or "use threshold"
  94.  
  95.      11110000....  sparse thresh: <n>
  96.  
  97.      11111111....  num local procs: <n>
  98.  
  99.           This is the number of local process created to do mandel/julia
  100.           calculations.  This is done entirely within mmmmaaaannnnddddeeeellll.  This count does
  101.           not include any mmmmaaaannnnddddeeeellllzzzzoooooooommmm executions.
  102.  
  103.      11112222....  rexec timeout: <n>
  104.  
  105.           This is the maximum number of seconds mmmmaaaannnnddddeeeellll will take in starting
  106.           up a mmmmaaaannnnddddeeeellllzzzzoooooooommmm execution before it gives up.
  107.  
  108.      11113333....  color distrib: "linear" or "maximize [n]"
  109.  
  110.           where n is 1, 2, or 3 (or n may be omitted).
  111.  
  112.      Default values are used if none of the above are given.
  113.  
  114.      11114444....  A comment line, denoted by a "#" as the first character in a line.
  115.  
  116.      The mmmmaaaannnnddddeeeellllzzzzoooooooommmm program can be placed on up to MAXHOSTS remote hosts.
  117.      MAXHOSTS is initialized to be 50.  For those users who installed the demo
  118.      source, MAXHOSTS is defined in mangfx.h.
  119.  
  120.    OOOOppppttttiiiioooonnnnssss
  121.      The mmmmaaaannnnddddeeeellll program may take options and arguments.
  122.  
  123.      _m_a_n_d_e_l _o_p_t_i_o_n_s
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  137.  
  138.  
  139.  
  140.      ----cccc  <<<<ccccoooooooorrrrdddd>>>>   A coordinate is to follow instead of fname.
  141.  
  142.                    Coord format: xxxxccccoooorrrrnnnneeeerrrr yyyyccccoooorrrrnnnneeeerrrr ssssiiiiddddeeee [[[[sssseeeeeeeeddddrrrr sssseeeeeeeeddddiiii]]]]
  143.  
  144.                    xxxxccccoooorrrrnnnneeeerrrr,,,, yyyyccccoooorrrrnnnneeeerrrr (xcorner, ycorner) = complex coordinate of
  145.                    the lower left corner of the rectangle.  In screen (pixel)
  146.                    coordinates, the rectangle has corners (0, ymin) and
  147.                    (xmax-1, ymax-1).
  148.  
  149.                    ssssiiiiddddeeee side = horizontal length of the complex rectangle.
  150.  
  151.                    sssseeeeeeeeddddrrrr,,,, sssseeeeeeeeddddiiii (seedr, seedi) = coordinate of the (Julia)
  152.                    seed point.  seedr & seedi exist only in the "extended
  153.                    format" implied by the -j option.
  154.  
  155.      ----ffff            Use a fixed-size window.  fname is displayed with the same
  156.                    size as when it was saved.
  157.  
  158.      ----iiii  <<<<nnnn>>>>       Specify number of iterations to use for calculations.
  159.  
  160.      ----jjjj            Do Julia calculations instead of Mandelbrot.  Only
  161.                    applicable if coordinate is given.  Also, implies that
  162.                    coord is an "extended coordinate" containing a seed point.
  163.  
  164.      ----mmmm            max-precision floating point (128-bits).
  165.  
  166.      ----nnnn  <<<<nnnn>>>>       Number of local (non-network) processes mandel uses for
  167.                    calculations.
  168.  
  169.      ----oooo            Compatibility with some old IRIS GL programs which use
  170.                    color cells 256 - 640.
  171.  
  172.      ----pppp            Calculation processes will send compressed data.  (Useful
  173.                    if network bandwith is a limitation).
  174.  
  175.      ----vvvv            Variable-size window.
  176.  
  177.      ffffnnnnaaaammmmeeee         Name of file containing mandelbrot data.  If fname is
  178.                    omitted, the image will be generated.
  179.  
  180.      _m_a_n_d_e_l_z_o_o_m _o_p_t_i_o_n_s
  181.  
  182.      The mmmmaaaannnnddddeeeellllzzzzoooooooommmm program does not take any command line options.  However,
  183.      it reads various commands from stdin, and it writes mandelbrot data to
  184.      stdout.
  185.  
  186.    OOOOppppeeeerrrraaaattttiiiioooonnnn
  187.      The _l_e_f_t _m_o_u_s_e button is used to drag out a rectangular area which will
  188.      be zoomed.  (This operation may be cancelled by pressing either _m_i_d_d_l_e
  189.      _m_o_u_s_e or the _E_S_C_A_P_E key while _l_e_f_t _m_o_u_s_e is still down.)
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  203.  
  204.  
  205.  
  206.      The _r_i_g_h_t _m_o_u_s_e button brings up the menu.  The menu items are as
  207.      follows:
  208.  
  209.      ggggeeeennnneeeerrrraaaatttteeee      allows you to re-generate the current picture (either
  210.                    zoomed or not), or to re-generate the previous image.  From
  211.                    this menu, selecting ccccuuuurrrrrrrreeeennnntttt causes the current picture to
  212.                    be re-generated.  PPPPrrrreeeevvvviiiioooouuuussss re-creates the previously
  213.                    displayed picture.  FFFFiiiirrrrsssstttt ppppiiiicccc displays the first image.
  214.                    HHHHoooommmmeeee displays the initial mandelbrot set.  ZZZZoooooooommmm oooouuuutttt allows
  215.                    you to zoom out from the current image by one of a given
  216.                    range of zoom values.
  217.  
  218.      cccchhhhaaaannnnggggeeee ccccoooolllloooorrrrssss allows you to select one of several color ramps.
  219.  
  220.      ccccoooolllloooorrrr ddddiiiissssttttrrrriiiibbbbuuuuttttiiiioooonnnn
  221.                    specifies how mandel maps the number of colors from the
  222.                    mandel data onto the number of display colors.  The choices
  223.                    are
  224.  
  225.                         lllliiiinnnneeeeaaaarrrr
  226.                         mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss 1111
  227.                         mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss 2222
  228.                         mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss 3333.
  229.  
  230.                    If there are 32768 mandel data colors and, say, 4096
  231.                    display colors, then lllliiiinnnneeeeaaaarrrr causes the first 8 colors 0 - 7
  232.                    to be mapped to color 0 of the display, colors 8 - 15 to be
  233.                    mapped to display color 1, etc.  Unfortunately, the mandel
  234.                    data for a small rectangle might contain only _s_o_m_e of the
  235.                    possible values 0 - 32767, and then the image displayed can
  236.                    appear to be mostly all the same color.  Choosing one of
  237.                    the mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss selections remedies this situation.
  238.                    Internally, a histogram is created from the mandel data,
  239.                    and then the data is mapped to the display such that the
  240.                    resulting picture should have a good distribution of
  241.                    colors.  As nnnn increases in "mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss nnnn", the less
  242.                    skewed the distribution of colors.
  243.  
  244.                    Note that the various "mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss nnnn" selections behave
  245.                    differently only if the number of distinct values in the
  246.                    mandel data is less than the number of display colors used
  247.                    by the mandel program.  (If the hardware has more than 8
  248.                    bit planes, mandel does 12-bit color-index drawing, and
  249.                    uses somewhat less than the 4096 entries in the colormap.)
  250.                    So, ... if an image was generated with a large iteration
  251.                    count, and if that image contains lots of different color
  252.                    values, then the 3 "mmmmaaaaxxxxiiiimmmmiiiizzzzeeee ccccoooolllloooorrrrssss" selections will all do
  253.                    the same thing, which will still be different than the
  254.                    "lllliiiinnnneeeeaaaarrrr" selection.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  269.  
  270.  
  271.  
  272.      ####iiiitttteeeerrrraaaattttiiiioooonnnnssss   selects the number of iterations to be performed from a
  273.                    range of values.
  274.  
  275.      ssssaaaavvvveeee          allows you to save the current image in one of 2 formats:
  276.                    mandel format or SGI RGB format.  A file saved in the
  277.                    "mandel format" contains coordinate data, and if such a
  278.                    file is given as an argument to mandel, mandel will allow
  279.                    further zoom-in operations, etc., to be done on the
  280.                    displayed picture.  Alternatively, the coordinate data for
  281.                    the current picture can be saved to a file.  (If the latter
  282.                    is done, the picture can be re-generated with
  283.  
  284.                         mandel -c `cat fname`
  285.  
  286.                    where _f_n_a_m_e is the name of the file containing the
  287.                    coordinate data.)
  288.  
  289.      mmmmooooddddeeee          selects Mandelbrot or Julia set.  If Julia is selected, a
  290.                    crosshair cursor appears for selecting the seed point.  Use
  291.                    the left mouse button to pick a point.
  292.  
  293.      ffffllllooooaaaattttiiiinnnngggg pppptttt pppprrrreeeecccc
  294.                    Choose between double precision floating point (64-bit) or
  295.                    long double (128-bit).
  296.  
  297.      ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn allows the user to select from the following submenu.
  298.  
  299.                    iiiinnnntttteeeerrrrppppoooollllaaaatttteeee.... If row delta (see below) is > n, the picture
  300.                    is generated in n passes.  Eventually, every scanline of
  301.                    the picture is generated.  However, each pass contains only
  302.                    1/n-th (approx.) of the total scanlines, and up till the
  303.                    final pass, there are gaps in the picture.  As a scanline
  304.                    is generated, if there is a gap between that scanline and
  305.                    the one below or above it, and if iiiinnnntttteeeerrrrppppoooollllaaaatttteeee is set to
  306.                    "yes," this causes the gaps to be filled in with
  307.                    "reasonable" mandelbrot data (by interpolating between the
  308.                    filled-in scanlines).
  309.  
  310.                    rrrroooowwww ddddeeeellllttttaaaa.... If delta = 1, then rows are computed in the
  311.                    order ymin, ymin+1, ymin+2, ...  However, if delta > 1,
  312.                    then rows are computed in the order ymin, ymin + d, ymin +
  313.                    d*2, ..., followed by ymin + k, ymin + d + k, ymin + d*2 +
  314.                    k, ...  for appropriate k's until the picture is done.
  315.  
  316.                    (Note:  If row delta > 1 and "interpolate" is "yes," this
  317.                    allows an approximately accurate picture to be generated n
  318.                    times faster than by generating the entire picture with no
  319.                    gaps.)
  320.  
  321.                    rrrroooowwwwssss ppppeeeerrrr ffffaaaarrrrmmmmoooouuuutttt specifies the number of rows at a time
  322.                    which each host is given to calculate.  If equal to 1, the
  323.                    computation is most equally divided among the hosts;
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  335.  
  336.  
  337.  
  338.                    however, this causes more network overhead, since mandel
  339.                    has to send out a command (to some remote host) for every
  340.                    scanline.
  341.  
  342.                    ssssppppaaaarrrrsssseeee ppppaaaasssssssseeeessss.... If "sparse passes" is "yes," this causes the
  343.                    first pass (and only the first pass) to be split into 2
  344.                    "sparse" passes, where each sparse pass is done by
  345.                    computing every other pixel of the scanline.  For example,
  346.                    with row delta = 2 and "sparse rows" set to "yes", we have:
  347.  
  348.                         pass 1a - every even pixel of scanlines 1, 3, 5, ...
  349.                         pass 1b - every odd pixel of scanlines 1, 3, 5, ...
  350.                         pass 2  - scanlines 2, 4, 6, ...
  351.  
  352.                    The default is that the first pass is split into two sparse
  353.                    passes only if
  354.  
  355.                        (#pixels per scanline) * (max iterations per pixel) >=
  356.                    threshold
  357.  
  358.                    where "threshold" = 1,000,000.  The idea is that the
  359.                    threshold will be exceeded only if the picture becomes
  360.                    large and computationally expensive to generate.  The
  361.                    default threshold can be modified by specifying an
  362.                    alternate value in the .mandelrc file.
  363.  
  364.      ssssttttoooopppp ddddrrrraaaawwwwiiiinnnngggg  causes the processes doing calculations to stop, and causes
  365.                    the current image to stop drawing.
  366.  
  367.      eeeexxxxiiiitttt          quits the program.
  368.  
  369.    EEEErrrrrrrroooorrrr HHHHaaaannnnddddlllliiiinnnngggg
  370.      When mandel encounters an error when reading data from a remote host, it
  371.      will stop reading from that host for the duration of the current picture
  372.      generation, but will try to use that host again next time, for the next
  373.      picture.
  374.  
  375.    CCCCoooolllloooorrrr ffffiiiilllleeeessss
  376.      mandel contains several default color maps, but it will look for
  377.      alternate or additional color maps in data files beginning with the name
  378.      "color".  If you have a file named "colorxy," then "xy" will show up in
  379.      the colors menu.
  380.  
  381.      By default these color files are searched for in the directory named
  382.      "colors", but you may specify a different directory name by having a
  383.      "color dir" entry in .mandelrc.
  384.  
  385.      Each line in a "color" file specifies a color by
  386.  
  387.              <red intensity>  <blue intensity>  <blue intensity>
  388.  
  389.      with intensities ranging from 0 to 255.  Intensities may be delimited by
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))                                                          MMMMAAAANNNNDDDDEEEELLLL((((6666DDDD))))
  401.  
  402.  
  403.  
  404.      commas, spaces, or tabs.
  405.  
  406.      The first color is that of the mandelbrot set and is usually black
  407.      (0,0,0).  Smooth ramps are made between the remaining colors, and the
  408.      non-black part of the picture is drawn using those ramps.
  409.  
  410.      Example of color file contents:
  411.              0 0 0
  412.              40 0 0
  413.              240 0 0
  414.              240, 240, 0
  415.              240, 240, 240
  416.  
  417.  
  418.    RRRReeeeggggiiiioooonnnn SSSSeeeelllleeeeccccttttiiiioooonnnnssss wwwwiiiitttthhhh tttthhhheeee MMMMoooouuuusssseeee
  419.      After a picture is displayed, the left mouse button can be used to select
  420.      a new region to zoom in on.  If the "Julia" mode is selected after first
  421.      displaying a mandelbrot image, then the left mouse button is used for
  422.      selecting a seed point for the Julia calculations.
  423.  
  424.      When the left mouse button is being used to select a region or seed
  425.      point, the selection can be aborted by depressing either the middle or
  426.      right mouse buttons or the escape key.
  427.  
  428.    BBBBuuuuiiiillllddddiiiinnnngggg
  429.      If you chose to install the demo source, you will have received the
  430.      source code for the mmmmaaaannnnddddeeeellllzzzzoooooooommmm program and a generic Makefile to build
  431.      the binary.  The mandelzoom source files are very portable (except for
  432.      assumptions about sizes of certain data types). If you copy the
  433.      mandelzoom source files (*), along with Makefile.generic, to just about
  434.      any unix machine, and type
  435.              make -f Makefile.generic mandelzoom
  436.      the resulting mandelzoom program should work.
  437.      (*) The file "zoomsrc" contains a list of the mandelzoom source files.
  438.  
  439. AAAAUUUUTTTTHHHHOOOORRRR
  440.      Dave Spalding
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.